package com.xms.datacore.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xms.dependency.XmsDependencyException;

import java.sql.SQLException;
import java.util.Collection;
import java.util.UUID;

/**
 * <p>
 * 删除记录默认行为接口
 * </p>
 *
 * @author migo
 * @since 2021/9/2
 */
public interface IDeleterService<T> {
    IService<T> getService();

    boolean deleteById(UUID id) throws SQLException, XmsDependencyException;

    boolean deleteMany(Wrapper<T> queryWrapper) throws SQLException, XmsDependencyException;

    boolean deleteByIds(Collection<UUID> idList) throws SQLException, XmsDependencyException;

    void rollBack();
}
